package com.business.socialcredit;

import com.frame.struts.BaseBean;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.frame.struts.ActionContext;
import java.io.*;

/**
 * <p>
 * Title:
 * </p>
 * <p>
 * Description:
 * </p>
 * <p>
 * Copyright: Copyright (c) 2006
 * </p>
 * <p>
 * Company:
 * </p>
 * 
 * @author not attributable
 * @version 1.0
 */
public class SocialCreditForm extends BaseBean
{
    public SocialCreditForm()
    {
    }

    public String addGjfxx()
    {
        HttpServletRequest request = ActionContext.getActionContext()
                                                  .getRequest();
        HttpServletResponse response = ActionContext.getActionContext()
                                                    .getResponse();
        String qyid = (String) request.getSession()
                                      .getAttribute( "session_qyid" );
        SocialCreditFactory socialCreditFactory = SocialCreditFactory.getInstance();
        socialCreditFactory.delGjfxx( qyid );
        socialCreditFactory.addGjfxx( request );
        try
        {
            response.sendRedirect( "socialcredit/addgjfxx.jsp" );
        }
        catch( IOException ex )
        {
            ex.printStackTrace();
        }
        return null;
    }

    public String addJrjgxdxx()
    {
        HttpServletRequest request = ActionContext.getActionContext()
                                                  .getRequest();
        HttpServletResponse response = ActionContext.getActionContext()
                                                    .getResponse();
        String qyid = (String) request.getSession()
                                      .getAttribute( "session_qyid" );
        SocialCreditFactory socialCreditFactory = SocialCreditFactory.getInstance();
        socialCreditFactory.delJrjgxdxx( qyid );
        socialCreditFactory.addJrjgxdxx( request );
        try
        {
            response.sendRedirect( "socialcredit/addjrjgxdxx.jsp" );
        }
        catch( IOException ex )
        {
            ex.printStackTrace();
        }
        return null;
    }

}
